{load header}
<!--/H-->
<!-- 内容区 -->
<div id="main-content">
    <div id="top-alert" class="fixed alert alert-error" style="display: none;">
        <button class="close fixed" style="margin-top: 4px;">&times;</button>
        <div class="alert-content">这是内容</div>
    </div>
    <div id="main" class="main">

        <!-- nav -->
        <!-- nav -->


        <div class="main-title">
            <h2>提现订单详情</h2>
        </div>
        <div class="cf">
        </div>

        <div class="data-table">
            <div class="data-table table-striped">
                <form action="" method="post" class="form-horizontal">
                    <!-----table----->
                    <table class="table table-hover" style="width: 30%;">
                        <thead>
                        <tr>
                            <th width='25%'>选项名称</th>
                            <th width='75%'>选项值</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>申请用户：</td>

                            <td>{$item['username']}</td>
                        </tr>
                        <tr>
                            <td>订单编号：</td>

                            <td>{$item['order_nid']}</td>
                        </tr>
                        <tr>
                            <td>申请提现金额：</td>
                            <td>{$item['amount']}￥</td>
                        </tr>
                        <tr>
                            <td>手续费：</td>
                            <td>{$item['fee']}￥</td>
                        </tr>
                        <tr>
                            <td>实付金额：</td>
                            <td style="color: #f39a00;font-size:24px;">{$item['true_amount']}￥</td>
                        </tr>
                        <tr>
                            <td>账号名：</td>
                            <td>{$item['name']}</td>
                        </tr>
                        <tr>
                            <td>提现账号：</td>
                            <td style="color: #f39a00;font-size:24px;">{$item['account']}</td>
                        </tr>
                        <tr>
                            <td>提现类型：</td>
                            <td style="color: #f39a00;font-size:18px;">{$item['type']}</td>
                        </tr>
                        {if $item['bank_type']}
                        <tr>
                            <td>银行类型：</td>
                            <td>{$item['bank_type']}</td>
                        </tr>
                        <tr>
                            <td>银行支行：</td>
                            <td>{$item['bank_home']}</td>
                        </tr>
                        {/if}

                        <tr>
                            <td>申请时间：</td>
                            <td>{$item['create_time']}</td>
                        </tr>
                        <tr>
                            <td>处理时间：</td>
                            <td>{$item['update_time']}</td>
                        </tr>
                        <tr>
                            <td>订单状态：</td>
                            <td style="color: #f39a00;font-size:24px;">
                                {if $item['status'] == 1}
                                已支付
                                {elseif $item['status'] == 2}
                                未支付
                                {else}
                                失败
                                {/if}
                            </td>
                        </tr>
                        {if $item['status'] == 2}
                        <tr>
                            <td>备注（可选）：</td>
                            <td><input type="text" id="remark" name="remark" value="" class="text"></td>
                        </tr>
                        {else}
                        <tr>
                            <td>管理员：</td>
                            <td>{$item['admin_name']}</td>
                        </tr>
                        <tr>
                            <td>备注：</td>
                            <td>{$item['remark']}</td>
                        </tr>
                        {/if}
                        </tbody>
                    </table>
                    <br/>
                    <div class="form-item">
                        {if $item['status'] == 2}
                        <input type='hidden' id="order_nid" name="order_nid" value="{$item['order_nid']}"/>
                        <a href="javascript:void(0);" class="btn submit-btn" id="submit_yes"
                           target-form="form-horizontal">确定支付</a>
                        <a href="javascript:void(0);" class="btn submit-btn" id="submit_no"
                           target-form="form-horizontal">拒绝支付</a>
                        {/if}
                        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
                    </div>
                </form>
                <!-----/table----->
                <!-- 分页 -->
            </div>
        </div>


    </div>
</div>
<script type="text/javascript">
    $(function () {
        $(".submit-btn").click(function () {
            var that = this;
            var _status = $.trim($(this).attr("id"));
            _status = _status == "submit_yes" ? 1 : 0;
            var _nid = $.trim($("#order_nid").val());
            var _remark = $.trim($("#remark").val());
            $.ajax({
                url: "",
                async: false,
                dataType: "json",
                type: "post",
                data: {status: _status, nid: _nid, remark: _remark},
                success: function (data) {

                    if (data.status == 1) {
                        if (data.url) {
                            updateAlert(data.info + ' 页面即将自动跳转~', 'alert-success');
                        } else {
                            updateAlert(data.info, 'alert-success');
                        }
                        setTimeout(function () {
                            if (data.url) {
                                location.href = data.url;
                            } else if ($(that).hasClass('no-refresh')) {
                                $('#top-alert').find('button').click();
                                $(that).removeClass('disabled').prop('disabled', false);
                            } else {
                                location.reload();
                            }
                        }, 1500);
                    } else {
                        updateAlert(data.info);
                        setTimeout(function () {
                            if (data.url) {
                                location.href = data.url;
                            } else {
                                $('#top-alert').find('button').click();
                                $(that).removeClass('disabled').prop('disabled', false);
                            }
                        }, 1500);
                    }
                }
            });
        });
    });
</script>
<!--F-->{load footer}